#!/bin/bash
#mongod -dbpath D:/Mongodb #启动
 mongorestore -d dumall ./db/dumall  #导入数据


# if ps -ef | grep 'mongo' | egrep -v grep >/dev/null
#     then 
#         echo "mongo is started!"
#     else
#         echo "mongo not found!"
# fi

# progress = ps -ef |grep mongo | grep -v grep 
# if[$progress -eq 0]
#     then
#         echo $progress
#     else 
#         echo "无进程"

# fi
# echo $progress
# ps -ef |grep mongo | grep -v grep 
# if [ $? -eq 0 ]; 
#     then 
#         echo '正在运行'
#         mongorestore -d dumall ./db/dumall
#     else 
#         echo '没有运行,正准备启动' 
#         mongod -dbpath D:/Mongodb
# fi
# while [ $? eq 0 ]
# do
#     mongod -dbpath D:/Mongodb
# done

